﻿using Furion.DatabaseAccessor;
using FurStudy.Core;
using Microsoft.EntityFrameworkCore;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FurStudy.Application
{
    /// <summary>
    /// Person种子数据
    /// 多个数据库种子数据（此类同时为 MySqlDbContext 和 SqliteDbContext 创建种子数据）
    /// </summary>
    public class PersonSeedData : IEntitySeedData<F_Person,MySqlDbContextLocator, SqliteDbContextLocator>
    {
        /// <summary>
        /// 配置种子数据
        /// </summary>
        /// <param name="dbContext"></param> 
        /// <param name="dbContextLocator"></param>
        /// <returns></returns>
        public IEnumerable<F_Person> HasData(DbContext dbContext, Type dbContextLocator)
        {
            return new List<F_Person>
            {
                new F_Person { Id = 1, Name = "百小僧", Address = "广东省中山市" },
                new F_Person { Id = 2, Name = "新生帝", Address = "广东省珠海市"  }
            };
        }
    }
}
